package com.azy.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @ fileName:User
 * @ description:
 * @ author:Azy
 * @ createTime:2023/4/11 15:41
 * @ version:1.0.0
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "user")//实体类和表明的映射
public class User {
    @TableId(type = IdType.AUTO)
    private Long id;//如果你的主键不叫id，必须人为标记
    @TableField(value = "name")//属性名和列名不一致
    private String name;
    private int age;
    private String email;
//    @TableField(exist = false)//数据表中不存在该字段
//    private String address;
}
